//
//  HHSystemMessageCellData.m
//  HHChatKit
//
//  Created by Henry on 2021/6/2.
//

#import "HHSystemMessageCellData.h"
#import <HHTool/HHTool.h>

@implementation HHSystemMessageCellData

- (instancetype)init
{
    self = [super initWithDirection:HHMsgDirectionIncoming];
    if (self) {
        [self setupInit];
    }
    return self;
}

- (instancetype)initWithDirection:(HHMsgDirection)direction {
    self = [super initWithDirection:direction];
    if (self) {
        [self setupInit];
    }
    return self;
}

- (void)setupInit {
    _contentFont = [UIFont systemFontOfSize:13];
    _contentColor = [UIColor hh_colorWithLightColor:[UIColor hh_colorWithString:@"#666666"] darkColor:[UIColor hh_colorWithString:@"#DDDDDD"]];
}

- (CGSize)contentSize {
    CGFloat textWidthMax = [UIScreen mainScreen].bounds.size.width * 0.7;

    CGSize size = [self.content hh_textSizeIn:CGSizeMake(textWidthMax, MAXFLOAT) font:self.contentFont];
    return size;
}

+ (NSString *)reuseIdentifier {
    return @"HHSystemMessageCell";
}

@end
